.class public Lcom/netease/newsreader/adapter/VoteAdapter;
.super Landroid/widget/BaseAdapter;
.source "VoteAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;
    }
.end annotation


# instance fields
.field private mContext:Landroid/content/Context;

.field private mImageDownloader:Lcom/netease/newsreader/util/BaseImageDownloader;

.field private mInflater:Landroid/view/LayoutInflater;

.field private mList:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;"
        }
    .end annotation
.end field

.field private map:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;"
        }
    .end annotation
.end field

.field private themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;Lcom/netease/newsreader/util/BaseImageDownloader;)V
    .locals 1
    .parameter "context"
    .parameter
    .parameter "imageDownloader"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Ljava/util/Map",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;",
            "Lcom/netease/newsreader/util/BaseImageDownloader;",
            ")V"
        }
    .end annotation

    .prologue
    .line 43
    .local p2, list:Ljava/util/List;,"Ljava/util/List<Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 44
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mInflater:Landroid/view/LayoutInflater;

    .line 45
    iput-object p1, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    .line 46
    iput-object p2, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mList:Ljava/util/List;

    .line 47
    iput-object p3, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mImageDownloader:Lcom/netease/newsreader/util/BaseImageDownloader;

    .line 48
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-static {v0}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->getThemeSettingsHelper(Landroid/content/Context;)Lcom/netease/newsreader/util/ThemeSettingsHelper;

    move-result-object v0

    iput-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    .line 49
    return-void
.end method

.method static synthetic access$0(Lcom/netease/newsreader/adapter/VoteAdapter;)Ljava/util/Map;
    .locals 1
    .parameter

    .prologue
    .line 40
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    return-object v0
.end method

.method static synthetic access$1(Lcom/netease/newsreader/adapter/VoteAdapter;)Landroid/content/Context;
    .locals 1
    .parameter

    .prologue
    .line 35
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    return-object v0
.end method

.method private setTheme(Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;)V
    .locals 5
    .parameter "holder"

    .prologue
    const v4, 0x7f08001b

    .line 214
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    iget-object v2, p1, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDigest:Landroid/widget/TextView;

    const v3, 0x7f08002b

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 215
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    iget-object v2, p1, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDigest:Landroid/widget/TextView;

    const v3, 0x7f020102

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setViewBackgroud(Landroid/content/Context;Landroid/view/View;I)V

    .line 216
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    iget-object v2, p1, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDate:Landroid/widget/TextView;

    invoke-virtual {v0, v1, v2, v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 217
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    iget-object v2, p1, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteFlag:Landroid/widget/TextView;

    invoke-virtual {v0, v1, v2, v4}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 218
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->themeSettingsHelper:Lcom/netease/newsreader/util/ThemeSettingsHelper;

    iget-object v1, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    iget-object v2, p1, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteQuestion:Landroid/widget/TextView;

    const v3, 0x7f08001d

    invoke-virtual {v0, v1, v2, v3}, Lcom/netease/newsreader/util/ThemeSettingsHelper;->setTextViewColor(Landroid/content/Context;Landroid/widget/TextView;I)V

    .line 219
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 103
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealCount()I

    move-result v0

    return v0
.end method

.method public getInitPosition(I)I
    .locals 4
    .parameter "position"

    .prologue
    .line 58
    if-gez p1, :cond_0

    move v2, p1

    .line 71
    :goto_0
    return v2

    .line 62
    :cond_0
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealCount()I

    move-result v1

    .line 63
    .local v1, realCount:I
    if-gtz v1, :cond_1

    move v2, p1

    .line 64
    goto :goto_0

    .line 67
    :cond_1
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealPosition(I)I

    move-result p1

    .line 69
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/VoteAdapter;->getCount()I

    move-result v0

    .line 71
    .local v0, count:I
    div-int/lit8 v2, v0, 0x2

    div-int/lit8 v3, v0, 0x2

    rem-int/2addr v3, v1

    sub-int/2addr v2, v3

    add-int/2addr v2, p1

    goto :goto_0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 2
    .parameter "position"

    .prologue
    .line 108
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mList:Ljava/util/List;

    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealPosition(I)I

    move-result v1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 113
    invoke-virtual {p0, p1}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealPosition(I)I

    move-result v0

    int-to-long v0, v0

    return-wide v0
.end method

.method public getRealCount()I
    .locals 1

    .prologue
    .line 98
    iget-object v0, p0, Lcom/netease/newsreader/adapter/VoteAdapter;->mList:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getRealPosition(I)I
    .locals 1
    .parameter "position"

    .prologue
    .line 81
    if-gez p1, :cond_1

    .line 88
    .end local p1
    :cond_0
    :goto_0
    return p1

    .line 84
    .restart local p1
    :cond_1
    invoke-virtual {p0}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealCount()I

    move-result v0

    .line 85
    .local v0, realCount:I
    if-lez v0, :cond_0

    .line 88
    rem-int/2addr p1, v0

    goto :goto_0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 21
    .parameter "position"
    .parameter "convertView"
    .parameter "viewparent"

    .prologue
    .line 118
    invoke-virtual/range {p0 .. p1}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealPosition(I)I

    move-result p1

    .line 119
    invoke-virtual/range {p0 .. p0}, Lcom/netease/newsreader/adapter/VoteAdapter;->getRealCount()I

    move-result v2

    if-nez v2, :cond_0

    .line 120
    const/4 v2, 0x0

    .line 201
    :goto_0
    return-object v2

    .line 123
    :cond_0
    if-nez p2, :cond_1

    .line 124
    new-instance v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;

    move-object/from16 v0, p0

    invoke-direct {v14, v0}, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;-><init>(Lcom/netease/newsreader/adapter/VoteAdapter;)V

    .line 125
    .local v14, holderItem:Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mInflater:Landroid/view/LayoutInflater;

    const v3, 0x7f030077

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 127
    const v2, 0x7f0c016e

    move-object/from16 v0, p2

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    iput-object v2, v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mImageView:Landroid/widget/ImageView;

    .line 128
    const v2, 0x7f0c002e

    move-object/from16 v0, p2

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDigest:Landroid/widget/TextView;

    .line 129
    const v2, 0x7f0c0171

    move-object/from16 v0, p2

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteQuestion:Landroid/widget/TextView;

    .line 130
    const v2, 0x7f0c0031

    move-object/from16 v0, p2

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDate:Landroid/widget/TextView;

    .line 131
    const v2, 0x7f0c0030

    move-object/from16 v0, p2

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    iput-object v2, v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteFlag:Landroid/widget/TextView;

    .line 133
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-static {v2}, Lcom/netease/newsreader/util/Tools;->getScreenWidth(Landroid/content/Context;)I

    move-result v20

    .line 134
    .local v20, w:I
    invoke-static/range {v20 .. v20}, Lcom/netease/newsreader/util/Tools;->getCutHeadPicHeight(I)I

    move-result v12

    .line 136
    .local v12, h:I
    iget-object v2, v14, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mImageView:Landroid/widget/ImageView;

    new-instance v3, Landroid/widget/FrameLayout$LayoutParams;

    const/4 v4, -0x1

    invoke-direct {v3, v4, v12}, Landroid/widget/FrameLayout$LayoutParams;-><init>(II)V

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    .line 138
    move-object/from16 v0, p2

    invoke-virtual {v0, v14}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 142
    .end local v12           #h:I
    .end local v14           #holderItem:Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;
    .end local v20           #w:I
    :cond_1
    invoke-virtual/range {p2 .. p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v13

    check-cast v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;

    .line 143
    .local v13, holder:Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mList:Ljava/util/List;

    move/from16 v0, p1

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/util/Map;

    move-object/from16 v0, p0

    iput-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    .line 144
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    const-string v4, "imgsrc"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v15

    .line 145
    .local v15, imgsrc:Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-static {v15, v2}, Lcom/netease/newsreader/util/PicUtil;->getHeandBitMapURL(Ljava/lang/String;Landroid/content/Context;)Ljava/lang/String;

    move-result-object v15

    .line 147
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mImageDownloader:Lcom/netease/newsreader/util/BaseImageDownloader;

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v3

    invoke-virtual {v2, v3}, Lcom/netease/newsreader/util/BaseImageDownloader;->setThread(Ljava/lang/Thread;)V

    .line 148
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mImageDownloader:Lcom/netease/newsreader/util/BaseImageDownloader;

    iget-object v3, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mImageView:Landroid/widget/ImageView;

    invoke-virtual {v2, v15, v3}, Lcom/netease/newsreader/util/BaseImageDownloader;->download(Ljava/lang/String;Landroid/widget/ImageView;)V

    .line 150
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    const-string v4, "vote_id"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v18

    .line 151
    .local v18, voteId:Ljava/lang/String;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    const-string v4, "digest"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v17

    .line 152
    .local v17, voteDigest:Ljava/lang/String;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    const-string v4, "question"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v19

    .line 153
    .local v19, voteQuestion:Ljava/lang/String;
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->map:Ljava/util/Map;

    const-string v4, "date"

    invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v16

    .line 155
    .local v16, voteDate:Ljava/lang/String;
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDigest:Landroid/widget/TextView;

    move-object/from16 v0, v17

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 156
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteQuestion:Landroid/widget/TextView;

    move-object/from16 v0, v19

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 157
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteDate:Landroid/widget/TextView;

    move-object/from16 v0, v16

    invoke-virtual {v2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 159
    move-object/from16 v0, p0

    iget-object v2, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v2}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v9

    check-cast v9, Lcom/netease/newsreader/activity/MyApplication;

    .line 160
    .local v9, app:Lcom/netease/newsreader/activity/MyApplication;
    invoke-virtual {v9}, Lcom/netease/newsreader/activity/MyApplication;->getSQLiteDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v1

    .line 161
    .local v1, db:Landroid/database/sqlite/SQLiteDatabase;
    const-string v2, "vote_table"

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/String;

    const/4 v4, 0x0

    const-string v5, "vote_id"

    aput-object v5, v3, v4

    .line 162
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "vote_id="

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object/from16 v0, v18

    invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/4 v7, 0x0

    const-string v8, "auto_id desc"

    .line 161
    invoke-virtual/range {v1 .. v8}, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v10

    .line 164
    .local v10, cur:Landroid/database/Cursor;
    invoke-interface {v10}, Landroid/database/Cursor;->getCount()I

    move-result v11

    .line 165
    .local v11, flag:I
    invoke-interface {v10}, Landroid/database/Cursor;->close()V

    .line 167
    if-nez p1, :cond_3

    .line 168
    if-lez v11, :cond_2

    .line 169
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteFlag:Landroid/widget/TextView;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0b003c

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 181
    :goto_1
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mImageView:Landroid/widget/ImageView;

    new-instance v3, Lcom/netease/newsreader/adapter/VoteAdapter$1;

    move-object/from16 v0, p0

    invoke-direct {v3, v0}, Lcom/netease/newsreader/adapter/VoteAdapter$1;-><init>(Lcom/netease/newsreader/adapter/VoteAdapter;)V

    invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 200
    move-object/from16 v0, p0

    invoke-direct {v0, v13}, Lcom/netease/newsreader/adapter/VoteAdapter;->setTheme(Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;)V

    move-object/from16 v2, p2

    .line 201
    goto/16 :goto_0

    .line 171
    :cond_2
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteFlag:Landroid/widget/TextView;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0b003d

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 174
    :cond_3
    if-lez v11, :cond_4

    .line 175
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteFlag:Landroid/widget/TextView;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0b003c

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1

    .line 177
    :cond_4
    iget-object v2, v13, Lcom/netease/newsreader/adapter/VoteAdapter$ViewHolder;->mVoteFlag:Landroid/widget/TextView;

    move-object/from16 v0, p0

    iget-object v3, v0, Lcom/netease/newsreader/adapter/VoteAdapter;->mContext:Landroid/content/Context;

    invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f0b003b

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_1
.end method
